APPS = Test FlickR Weather
CC = g++

CFLAGS	= -O0 -Wall -fPIC -g

LIBS	=	-lOpenNI 	\
		-lXnVNite 	\
		-lGL 		\
		-lGLU 		\
		-lglut		\
		-lboost_serialization-mt

INCLUDE_PATH =	-I/usr/include/nite/	\
		-I/usr/include/ni/	\
		-I../View/UI

EXEC	= 

BUILDDIR = ../build/

OUTPUTDIR = ../../app/

DEFINE	= -DDEBUG

DEPEND = $(addprefix $(OUTPUTDIR),$(EXEC))

all: $(DEPEND) $(BUILDDIR)App.o $(APPS)
	@$(MAKE) $(APPS) "COMMAND=$@"

.PHONY:$(APPS)

$(APPS):
	@echo " "
	@echo " -----> make $(COMMAND) in $@"
	$(MAKE) --directory=$@ $(COMMAND)

$(BUILDDIR)%.o:%.cpp
	$(CC) -o $@ -c $^ $(DEFINE) $(INCLUDE_PATH) $(CFLAGS)

clean:
	rm -f $(BUILDDIR)*.o $(addprefix $(OUTPUTDIR),$(EXEC))
	@$(MAKE) $(APPS) "COMMAND=$@"
